\(\int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx\) [668]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 115 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {3 a \csc (c+d x)}{d}-\frac {3 a \csc ^2(c+d x)}{2 d}+\frac {a \csc ^3(c+d x)}{d}+\frac {3 a \csc ^4(c+d x)}{4 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^6(c+d x)}{6 d}-\frac {a \log (\sin (c+d x))}{d}-\frac {a \sin (c+d x)}{d} \]

[Out]

-3*a*csc(d*x+c)/d-3/2*a*csc(d*x+c)^2/d+a*csc(d*x+c)^3/d+3/4*a*csc(d*x+c)^4/d-1/5*a*csc(d*x+c)^5/d-1/6*a*csc(d*
x+c)^6/d-a*ln(sin(d*x+c))/d-a*sin(d*x+c)/d

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2786, 90} \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \sin (c+d x)}{d}-\frac {a \csc ^6(c+d x)}{6 d}-\frac {a \csc ^5(c+d x)}{5 d}+\frac {3 a \csc ^4(c+d x)}{4 d}+\frac {a \csc ^3(c+d x)}{d}-\frac {3 a \csc ^2(c+d x)}{2 d}-\frac {3 a \csc (c+d x)}{d}-\frac {a \log (\sin (c+d x))}{d} \]

[In]

Int[Cot[c + d*x]^7*(a + a*Sin[c + d*x]),x]

[Out]

(-3*a*Csc[c + d*x])/d - (3*a*Csc[c + d*x]^2)/(2*d) + (a*Csc[c + d*x]^3)/d + (3*a*Csc[c + d*x]^4)/(4*d) - (a*Cs
c[c + d*x]^5)/(5*d) - (a*Csc[c + d*x]^6)/(6*d) - (a*Log[Sin[c + d*x]])/d - (a*Sin[c + d*x])/d

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2786

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(a-x)^3 (a+x)^4}{x^7} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \left (-1+\frac {a^7}{x^7}+\frac {a^6}{x^6}-\frac {3 a^5}{x^5}-\frac {3 a^4}{x^4}+\frac {3 a^3}{x^3}+\frac {3 a^2}{x^2}-\frac {a}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {3 a \csc (c+d x)}{d}-\frac {3 a \csc ^2(c+d x)}{2 d}+\frac {a \csc ^3(c+d x)}{d}+\frac {3 a \csc ^4(c+d x)}{4 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^6(c+d x)}{6 d}-\frac {a \log (\sin (c+d x))}{d}-\frac {a \sin (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.97 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {3 a \csc (c+d x)}{d}+\frac {a \csc ^3(c+d x)}{d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \left (6 \cot ^2(c+d x)-3 \cot ^4(c+d x)+2 \cot ^6(c+d x)+12 \log (\cos (c+d x))+12 \log (\tan (c+d x))\right )}{12 d}-\frac {a \sin (c+d x)}{d} \]

[In]

Integrate[Cot[c + d*x]^7*(a + a*Sin[c + d*x]),x]

[Out]

(-3*a*Csc[c + d*x])/d + (a*Csc[c + d*x]^3)/d - (a*Csc[c + d*x]^5)/(5*d) - (a*(6*Cot[c + d*x]^2 - 3*Cot[c + d*x
]^4 + 2*Cot[c + d*x]^6 + 12*Log[Cos[c + d*x]] + 12*Log[Tan[c + d*x]]))/(12*d) - (a*Sin[c + d*x])/d

Maple [A] (verified)

Time = 0.41 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.24

method result size
derivativedivides \(\frac {a \left (-\frac {\cos ^{8}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos ^{8}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{3}}-\frac {\cos ^{8}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )\right )+a \left (-\frac {\left (\cot ^{6}\left (d x +c \right )\right )}{6}+\frac {\left (\cot ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) \(143\)
default \(\frac {a \left (-\frac {\cos ^{8}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos ^{8}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{3}}-\frac {\cos ^{8}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )\right )+a \left (-\frac {\left (\cot ^{6}\left (d x +c \right )\right )}{6}+\frac {\left (\cot ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) \(143\)
parallelrisch \(-\frac {19 \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\frac {13}{32}+\frac {2 \left (-10+\cos \left (6 d x +6 c \right )-6 \cos \left (4 d x +4 c \right )+15 \cos \left (2 d x +2 c \right )\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{19}+\frac {2 \left (10-\cos \left (6 d x +6 c \right )+6 \cos \left (4 d x +4 c \right )-15 \cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{19}+\sin \left (5 d x +5 c \right )-\frac {\sin \left (7 d x +7 c \right )}{19}-\frac {101 \cos \left (2 d x +2 c \right )}{1216}+\frac {97 \cos \left (4 d x +4 c \right )}{608}+\frac {287 \cos \left (6 d x +6 c \right )}{3648}+\frac {599 \sin \left (d x +c \right )}{95}-\frac {65 \sin \left (3 d x +3 c \right )}{19}\right ) \left (\csc ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{4096 d}\) \(197\)
risch \(i a x +\frac {i a \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a c}{d}-\frac {2 i a \left (45 i {\mathrm e}^{10 i \left (d x +c \right )}+45 \,{\mathrm e}^{11 i \left (d x +c \right )}-90 i {\mathrm e}^{8 i \left (d x +c \right )}-165 \,{\mathrm e}^{9 i \left (d x +c \right )}+170 i {\mathrm e}^{6 i \left (d x +c \right )}+318 \,{\mathrm e}^{7 i \left (d x +c \right )}-90 i {\mathrm e}^{4 i \left (d x +c \right )}-318 \,{\mathrm e}^{5 i \left (d x +c \right )}+45 i {\mathrm e}^{2 i \left (d x +c \right )}+165 \,{\mathrm e}^{3 i \left (d x +c \right )}-45 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(212\)
norman \(\frac {-\frac {a}{384 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{160 d}+\frac {11 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}+\frac {7 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}-\frac {25 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 d}-\frac {35 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {35 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {35 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {25 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 d}+\frac {7 a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}+\frac {11 a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}-\frac {a \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}-\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(273\)

[In]

int(cos(d*x+c)^7*csc(d*x+c)^7*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(-1/5/sin(d*x+c)^5*cos(d*x+c)^8+1/5/sin(d*x+c)^3*cos(d*x+c)^8-1/sin(d*x+c)*cos(d*x+c)^8-(16/5+cos(d*x+c
)^6+6/5*cos(d*x+c)^4+8/5*cos(d*x+c)^2)*sin(d*x+c))+a*(-1/6*cot(d*x+c)^6+1/4*cot(d*x+c)^4-1/2*cot(d*x+c)^2-ln(s
in(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.37 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=\frac {90 \, a \cos \left (d x + c\right )^{4} - 135 \, a \cos \left (d x + c\right )^{2} - 60 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 12 \, {\left (5 \, a \cos \left (d x + c\right )^{6} - 30 \, a \cos \left (d x + c\right )^{4} + 40 \, a \cos \left (d x + c\right )^{2} - 16 \, a\right )} \sin \left (d x + c\right ) + 55 \, a}{60 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^7*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/60*(90*a*cos(d*x + c)^4 - 135*a*cos(d*x + c)^2 - 60*(a*cos(d*x + c)^6 - 3*a*cos(d*x + c)^4 + 3*a*cos(d*x + c
)^2 - a)*log(1/2*sin(d*x + c)) - 12*(5*a*cos(d*x + c)^6 - 30*a*cos(d*x + c)^4 + 40*a*cos(d*x + c)^2 - 16*a)*si
n(d*x + c) + 55*a)/(d*cos(d*x + c)^6 - 3*d*cos(d*x + c)^4 + 3*d*cos(d*x + c)^2 - d)

Sympy [F(-1)]

Timed out. \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**7*csc(d*x+c)**7*(a+a*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.79 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {60 \, a \log \left (\sin \left (d x + c\right )\right ) + 60 \, a \sin \left (d x + c\right ) + \frac {180 \, a \sin \left (d x + c\right )^{5} + 90 \, a \sin \left (d x + c\right )^{4} - 60 \, a \sin \left (d x + c\right )^{3} - 45 \, a \sin \left (d x + c\right )^{2} + 12 \, a \sin \left (d x + c\right ) + 10 \, a}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^7*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/60*(60*a*log(sin(d*x + c)) + 60*a*sin(d*x + c) + (180*a*sin(d*x + c)^5 + 90*a*sin(d*x + c)^4 - 60*a*sin(d*x
 + c)^3 - 45*a*sin(d*x + c)^2 + 12*a*sin(d*x + c) + 10*a)/sin(d*x + c)^6)/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.90 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {60 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 60 \, a \sin \left (d x + c\right ) - \frac {147 \, a \sin \left (d x + c\right )^{6} - 180 \, a \sin \left (d x + c\right )^{5} - 90 \, a \sin \left (d x + c\right )^{4} + 60 \, a \sin \left (d x + c\right )^{3} + 45 \, a \sin \left (d x + c\right )^{2} - 12 \, a \sin \left (d x + c\right ) - 10 \, a}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^7*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/60*(60*a*log(abs(sin(d*x + c))) + 60*a*sin(d*x + c) - (147*a*sin(d*x + c)^6 - 180*a*sin(d*x + c)^5 - 90*a*s
in(d*x + c)^4 + 60*a*sin(d*x + c)^3 + 45*a*sin(d*x + c)^2 - 12*a*sin(d*x + c) - 10*a)/sin(d*x + c)^6)/d

Mupad [B] (verification not implemented)

Time = 11.73 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.32 \[ \int \cot ^7(c+d x) (a+a \sin (c+d x)) \, dx=\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32\,d}-\frac {29\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {19\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {a\,\left (1920\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-1920\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{1920\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {51\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{16}+\frac {29\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{128}+\frac {35\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{32}+\frac {25\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{128}-\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{80}-\frac {11\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{384}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{160}+\frac {a}{384}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

[In]

int((cos(c + d*x)^7*(a + a*sin(c + d*x)))/sin(c + d*x)^7,x)

[Out]

(3*a*tan(c/2 + (d*x)/2)^3)/(32*d) - (29*a*tan(c/2 + (d*x)/2)^2)/(128*d) - (19*a*tan(c/2 + (d*x)/2))/(16*d) + (
a*tan(c/2 + (d*x)/2)^4)/(32*d) - (a*tan(c/2 + (d*x)/2)^5)/(160*d) - (a*tan(c/2 + (d*x)/2)^6)/(384*d) - (a*(192
0*log(tan(c/2 + (d*x)/2)) - 1920*log(tan(c/2 + (d*x)/2)^2 + 1)))/(1920*d) - (cot(c/2 + (d*x)/2)^6*(a/384 + (a*
tan(c/2 + (d*x)/2))/160 - (11*a*tan(c/2 + (d*x)/2)^2)/384 - (7*a*tan(c/2 + (d*x)/2)^3)/80 + (25*a*tan(c/2 + (d
*x)/2)^4)/128 + (35*a*tan(c/2 + (d*x)/2)^5)/32 + (29*a*tan(c/2 + (d*x)/2)^6)/128 + (51*a*tan(c/2 + (d*x)/2)^7)
/16))/(d*(tan(c/2 + (d*x)/2)^2 + 1))